# SI: Table S4

# Regression Analysis
tomodel <- manuscript_data %>% 
  filter(n_fem_rev >0 & reviewership == "mixed" & is.na(first_decision) ==F) %>% 
  mutate(n_fem_rev = ifelse(n_fem_rev == 1, "1", ifelse(n_fem_rev == 2, "2", ">=3")))  %>%
  mutate(n_fem_rev = factor(n_fem_rev, levels = c("1", "2", ">=3"))
         , gender_type3 = factor(gender_type3, levels = c("Male", "Mixed Team", "Female"))
         , subfield = factor(subfield, levels = c("American Government & Politics", "Comparative Politics", "Formal Theory", "International Relations", "Methodology" 
                                                  , "Normative Political Theory", "Race, Ethnicity, & Politics", "Other"))
         )

m1 <- lm(rev_score_opt ~ n_fem_rev  +  gender_type3 + subfield, data = filter(tomodel))
m1_nr <- lm(non_reject ~ rev_score_opt  +  gender_type3 + subfield, data = tomodel)


texreg(list(m1, m1_nr)
       , custom.model.names = c("Review Score", "Non-Reject Decision")
       , custom.coef.names = c("Intercept", "Two female reviewer", "More than two female reviewer", "Mixed team", "Female authorship", "Comparative politics", "Formal Theory", "International Relations"
                               , "Methodology", "Normative Theory", "Race and Ethnicity", "Other", "Review Score"
       )
       , sideways = F
       , caption.above = TRUE
       , caption = "OLS Regression Results"
       , file = here("02_output", "01_tables", "table_s4.tex"))
